<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>条件指令</title>
  <script src="https://cdn.bootcss.com/vue/2.6.11/vue.min.js"></script>
  <style>
    .box {
      border-bottom: 1px solid red;
      margin-bottom: 20px;
      padding-bottom: 5px;
    }
    .tip {
      color: red;
    }
  </style>
</head>
<body>
  <h1>条件指令</h1>
  <div id="app">
    <div class="box">
      <h3>v-if   v-else</h3>
      <p v-if="ok"> ok 是true</p>
      <p v-else>ok 是false</p>
    </div>

    <div class="box">
      <h3>template 标签</h3>
      <p>
        <template v-if="tok">
          <h5>包含</h5>
        </template>
      </p>
    </div>

    <div class="box">
      <h3>v-show</h3>
      <p v-show="isShow">这个是v-show</p>
    </div>

  </div>

  <script>
    var vue = new Vue({
      el: "#app",
      data: {
        msg: "Hello, World",
        ok: false,
        tok: true,
        isShow: false
      }
    })
  </script>
</body>
</html>